Skip to content

feat(media-use): core infrastructure — manifest, cache, adopt, probe#1682

Open
miguel-heygen wants to merge 1 commit into
mainfrom
media-use/1-core-infra
Open

feat(media-use): core infrastructure — manifest, cache, adopt, probe#1682
miguel-heygen wants to merge 1 commit into
mainfrom
media-use/1-core-infra

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

What

Brief description of the change.

Why

Why is this change needed?

How

How was this implemented? Any notable design decisions?

Test plan

How was this tested?

  • Unit tests added/updated
  • Manual testing performed
  • Documentation updated (if applicable)

Foundation for media-use — the media resolution layer for HyperFrames.

- manifest.mjs: JSONL read/write/find for .media/manifest.jsonl
- index-gen.mjs: regenerate agent-readable index.md from manifest
- cache.mjs: content-addressed global cache at ~/.media/ (SHA-256, sentinel)
- freeze.mjs: download URL or copy local file to .media/
- probe.mjs: extract duration/dimensions via ffprobe
- adopt.mjs: scan assets/ directory, register existing files with metadata
- 19 passing tests (manifest round-trip, cache, promote, index generation)
if (bytes.length === 0)
throw new Error(`freeze failed: empty response for ${String(url).slice(0, 80)}`);
mkdirSync(dirname(destPath), { recursive: true });
writeFileSync(destPath, bytes);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants